import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

/**
 * Files.readAllBytes()
 */
public class FilesReadAllBytesTest {
    public static void main(String[] args) {
        String fileName = "src/main/resources/static/TestReaderFile.txt";
        try {
            byte[] bytes = Files.readAllBytes(Paths.get(fileName));
            String content = new String(bytes, StandardCharsets.UTF_8);
            System.out.println(content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
